As hardware for reproducing and storing high resolution or high quality video content is being developed and supplied, a need for a video codec for effectively encoding or decoding the high resolution or high quality video content is increasing. In a conventional video codec, a video is encoded according to a limited encoding method based on a macroblock having a predetermined size.
Image data of a spatial domain is converted to coefficients of a frequency region by using a frequency conversion method. A video codec encodes frequency coefficients in units of blocks by dividing an image into a plurality of blocks having a predetermined size and performing discrete cosine transformation (DCT) conversion for rapid operation of frequency conversion. The coefficients of the frequency region are easily compressed compared to the image data of the spatial domain. In particular, a pixel value of an image in the spatial domain is represented as a prediction error, and thus, if frequency conversion is performed on the prediction error, a large amount of data may be converted to 0. A video codec converts data that is continuously and repeatedly generated into smaller data to reduce an amount of data.